class Person {
  String name;
  int age;

  Person(this.name, this.age);
  void show() {
    print('${this.name} --- ${this.age}');
  }
}

class Student extends Person {
  String? sex;

  // 利用super关键字，我们可以把与父类重复的属性交给父类的构造函数去处理，使用方式参考下方代码
  Student(String name, int age, String sex) : super(name, age) {
    this.sex = sex;
  }
}

void main() {
  var s1 = new Student('mika', 33,'男');
  s1.show();
}
